Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Uc gate global phase #8231

Merged
merged 7 commits into from
Jul 19, 2022
Merged

Fix Uc gate global phase #8231

merged 7 commits into from
Jul 19, 2022

Conversation

adjs
Copy link
Contributor

@adjs adjs commented Jun 24, 2022

Summary

This PR fixes the UCGate global phase and replaces PR #6226

@adjs adjs requested a review from a team as a code owner June 24, 2022 04:35
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Jun 24, 2022

Pull Request Test Coverage Report for Build 2664213723

  • 21 of 23 (91.3%) changed or added relevant lines in 2 files are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.008%) to 83.992%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/extensions/quantum_initializer/isometry.py 18 20 90.0%
Files with Coverage Reduction New Missed Lines %
qiskit/quantum_info/synthesis/one_qubit_decompose.py 2 97.61%
qiskit/extensions/quantum_initializer/squ.py 6 83.15%
Totals Coverage Status
Change from base Build 2658194086: -0.008%
Covered Lines: 55875
Relevant Lines: 66524

💛 - Coveralls

@adjs adjs changed the title Uc gate Fix Uc gate global phase Jun 24, 2022
@adjs adjs mentioned this pull request Jun 24, 2022
@mtreinish mtreinish added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: Bugfix Include in the "Fixed" section of the changelog labels Jun 24, 2022
@mtreinish mtreinish added this to the 0.21 milestone Jun 24, 2022
@HuangJunye HuangJunye added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Jun 28, 2022
@@ -73,6 +72,8 @@ def __init__(self, isometry, num_ancillas_zero, num_ancillas_dirty, epsilon=_EPS
if len(isometry.shape) == 1:
isometry = isometry.reshape(isometry.shape[0], 1)

self.iso_data = np.array(isometry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe it's necessary for this object to carry two copies of isometry; here and in self.params[0]. Also, the object should already be an ndarray.

@mergify mergify bot merged commit f2c2fe2 into Qiskit:main Jul 19, 2022
mergify bot pushed a commit that referenced this pull request Jul 19, 2022
* global phase UCGate

* Create global-phase-ucgate-cd61355e314a3e64.yaml

* Update qiskit/extensions/quantum_initializer/isometry.py

* Update qiskit/extensions/quantum_initializer/isometry.py

Co-authored-by: ewinston <ewinston@us.ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit f2c2fe2)
mergify bot added a commit that referenced this pull request Jul 19, 2022
* global phase UCGate

* Create global-phase-ucgate-cd61355e314a3e64.yaml

* Update qiskit/extensions/quantum_initializer/isometry.py

* Update qiskit/extensions/quantum_initializer/isometry.py

Co-authored-by: ewinston <ewinston@us.ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit f2c2fe2)

Co-authored-by: Adenilton Silva <7927558+adjs@users.noreply.github.com>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
hhorii added a commit to hhorii/qiskit-terra that referenced this pull request Aug 4, 2022
hhorii added a commit to hhorii/qiskit-terra that referenced this pull request Aug 4, 2022
hhorii added a commit to hhorii/qiskit-terra that referenced this pull request Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants